<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="${basePath}css/easyui.css">
<link rel="stylesheet" type="text/css" href="${basePath}css/icon.css">
<link rel="stylesheet" type="text/css" href="${basePath}css/demo.css">
<script type="text/javascript" src="${basePath}js/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}js/jquery.easyui.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>查询玩家日志</title>
<script type="text/javascript">
	function submitForm() {
		$('#ff').submit();
	}
</script>
</head>
<body>
	<div class="easyui-panel" title="" style="width: 400px">
		<div style="padding: 10px 60px 20px 60px">
			<form id="ff" method="post" action="QueryPlayerLogServlet">
				<table cellpadding="5">
					<tr>
						<td>玩家名:</td>
						<td><input class="easyui-textbox" type="text"
							name="playerName" data-options="required:true"
							value="${playerName}"></input></td>
					</tr>
					<tr>
						<td>服务器:</td>

						<td><select class="easyui-combobox" name="serverId">
								<c:forEach var="server" items="${servers}">
									<c:choose>
										<c:when
											test="${serverId}==${server.serverId}_${server.serverName}">
											<option value="${server.serverId}" selected="selected">${server.serverName}</option>
										</c:when>
										<c:otherwise>
											<option value="${server.serverId}_${server.serverName}">${server.serverName}</option>
										</c:otherwise>
									</c:choose>
								</c:forEach>
						</select></td>
					</tr>
					<tr>
						<td>時間</td>
						<td><input class="easyui-datebox" required
							style="width: 200px" name="date" value="${queryEmailInfo.date}">
						</td>

					</tr>
				</table>
			</form>
			<div style="text-align: center; padding: 5px">
				<a href="javascript:void(0)" class="easyui-linkbutton"
					onclick="submitForm()">Submit</a> <a href="javascript:void(0)"
					class="easyui-linkbutton" onclick="clearForm()">Clear</a>
			</div>
		</div>
	</div>

	<ul class="easyui-datalist" title="查詢結果" lines="true"
		style="width: 100%; height: 750px">
		<c:if test="${errorInfo != null}">
			<li>${errorInfo}</li>
		</c:if>
		<c:forEach var="playerInfoLog" items="${logs}">
			<li>${playerInfoLog.content}</li>
		</c:forEach>
	</ul>
</body>
</html>